import React from "react";
import { useNavigate } from "react-router-dom";
import { NavBar, Space, Toast } from 'antd-mobile'
function Header(props) {
  const tiao = useNavigate();
  return (
    <div
      style={{
        position: "fixed",
        top: "0",
        width: "100vw",
        left: "0",
        backgroundColor: "#fff",
      }}
    >
      <NavBar onBack={()=>tiao(-1)}>{props.title}</NavBar>
    </div>
  );
}

export default Header;
